
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type StoreProductReplyRequest struct {

	Uid string `json:"uid" form:"uid"`

	Oid string `json:"oid" form:"oid"`

	Unique string `json:"unique" form:"unique"`

	ProductId string `json:"product_id" form:"product_id"`

	ReplyType string `json:"reply_type" form:"reply_type"`

	ProductScore string `json:"product_score" form:"product_score"`

	ServiceScore string `json:"service_score" form:"service_score"`

	Comment string `json:"comment" form:"comment"`

	Pics string `json:"pics" form:"pics"`

	AddTime string `json:"add_time" form:"add_time"`

	MerchantReplyContent string `json:"merchant_reply_content" form:"merchant_reply_content"`

	MerchantReplyTime string `json:"merchant_reply_time" form:"merchant_reply_time"`

	IsDel string `json:"is_del" form:"is_del"`

	IsReply string `json:"is_reply" form:"is_reply"`

	Nickname string `json:"nickname" form:"nickname"`

	Avatar string `json:"avatar" form:"avatar"`

	Suk string `json:"suk" form:"suk"`

	Status string `json:"status" form:"status"`

}

func (r *StoreProductReplyRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *StoreProductReplyRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"uid": "required",

		"oid": "required",

		"unique": "required",

		"product_id": "required",

		"reply_type": "required",

		"product_score": "required",

		"service_score": "required",

		"comment": "required",

		"pics": "required",

		"add_time": "required",

		"merchant_reply_content": "required",

		"merchant_reply_time": "required",

		"is_del": "required",

		"is_reply": "required",

		"nickname": "required",

		"avatar": "required",

		"suk": "required",

		"status": "required",

	}
}

func (r *StoreProductReplyRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *StoreProductReplyRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *StoreProductReplyRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
